home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / textra16.lha / Textra116 / Scripts / SASC_Scripts / CTRLF.textra < prev    next >
Encoding:
Text File  |  1993-11-25  |  1.1 KB  |  70 lines

  1. /* ARexx macro for Textra & SAS/C
  2.  
  3.    'Find Symbol'
  4.  
  5.    Wow, one of the few ARexx commands Textra doesn't have... a 'get word
  6.    under cursor' command.
  7.  
  8.    However, with all the other commands it has, this can be done...
  9. */
  10.  
  11. options results
  12. get select position
  13.  
  14. oldselect = result
  15.  
  16. get cursor position
  17.  
  18. oldcursor = result
  19.  
  20. unselect
  21.  
  22. prefs alphanumerichops read
  23. alhops = result
  24. prefs alphanumerichops on
  25.  
  26. hopto prev word
  27. hopto next char
  28. hopselect next word
  29.  
  30. prefs alphanumerichops alhops
  31.  
  32. get select text
  33.  
  34. parse var result dummy ' ' parm
  35.  
  36. unselect
  37.  
  38. if (oldselect ~= "NO SELECT") then do
  39.     parse var oldselect ' ' startx ' ' starty ' ' endx ' ' endy
  40.     gotoxy startx starty
  41.     selectto endx endy
  42. end
  43.  
  44. if (oldcursor ~= "SELECT") then do
  45.    gotoxy oldcursor
  46. end
  47.  
  48. options
  49.  
  50. address command
  51.  
  52. 'sc:c/gst >t:gstout sc:include/all.gst ' || parm
  53.  
  54. gstrc = rc
  55.  
  56. dummy1 = open('gstout','t:gstout','read')
  57. where  = readln('gstout')
  58. dummy1 = close('gstout')
  59.  
  60. address
  61.  
  62. if (gstrc == 0) then do
  63.     parse var where file dummy1 line dummy2
  64.     openfile file        
  65.     gotoxy 0 line
  66. end
  67.  
  68. 'STATUSTEXT ' || where
  69.  
  70.